# coding=utf-8
__author__ = "leslie"
import pymssql
from common.readConfig import read

def db():
    host = read('sqlserver','host')
    user = read('sqlserver','user')
    passwd = read('sqlserver','passwd')
    db = read('sqlserver','db')
    try:
        db = pymssql.connect(host,user,passwd,db)
        print ("链接成功")
    except Exception as e:
        print (e)







if __name__ == '__main__':
    db()